<!--
 * @LastEditors: 杜康
 * @LastEditTime: 2021-12-27 10:07:49
-->
<template>
  <h1 class="font-bold text-2xl ">About {{name}}</h1>
  <p>
    <a-button @click="jumpToLogin2">执行跳转</a-button>
  </p>
</template>

<script setup>
import { computed } from 'vue'
import { useStore } from 'vuex'
const store = useStore()
import { useRouter } from 'vue-router'
const router = useRouter()
const name = computed(() => {
  return store.state.user.name
})
function jumpToLogin2() {
  router.push({
    name: 'TailwindStart',
    params: {
      userName: store.state.user.name
    }
  })
}
</script>